package top.linyuxb.lycloud.rpc.samples.server.impl;

import com.alibaba.fastjson2.JSONObject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import top.linyuxb.lycloud.rpc.samples.config.service.IServerService;
import top.linyuxb.lycloud.rpc.starter.annotation.LyRpcVersion;

/**
 * Created by Intellij IDEA.
 *
 * @Author: linyuxb
 * @Date: 2024/6/5 11:29
 * @Desc:
 */
@Slf4j
@Service(value = "serverService001")
@LyRpcVersion(version = "001")
public class ServerServiceImpl implements IServerService {
    @Override
    public JSONObject test(String info, Integer number, Boolean type) {
        log.info("serverService001 test,info:{},number:{},type:{}", info, number, type);
        JSONObject jsonObject = new JSONObject();
        jsonObject.put("class", "serverService001");
        jsonObject.put("method", "test");
        jsonObject.put("info", info);
        jsonObject.put("number", number);
        jsonObject.put("type", type);
        return jsonObject;
    }
}
